<?php

namespace IMooc;

interface IDatabase
{
    function connect($host, $user, $pass, $dbname);
    function query($ql);
    function close();
}

class Database
{
    protected static $ins = null;

    private function __construct()
    {
    }
    private function __clone()
    {
    }
    public static function getInstance()
    {
        if (self::$ins instanceof self) { 
            return self::$ins;
        }
        self::$ins = new self();
        return self::$ins;
    }

    function where($where) 
    {
        return $this;
    }

    function order($order) 
    {
        return $this;
    }

    function limit($limit)
    {
        return $this;
    }
}